<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>

<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.lable.drugqualityspecSeeStd"/></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="${ctx}/lib/js/html5shiv.min.js"></script>
        <script src="${ctx}/lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
                            
    <section class="content-header">
        <h1>72小时配送率</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            	<li><a href="#">交易</a></li>
                <li><a href="#">统计查询</a></li>
                <li><a href="#">72小时配送率</a></li>
        </ol>
    </section>
        
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
             <form  id="form" method="post">
                <div class="input">
                    <div class="textalign1">日期<spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                    		<table style="width:100%">
                    			<tr>
                    				<td style="width:50%">
                    					<input id="startMonth" name="startMonth" class="textinput" type="text" readonly placeholder="开始月份"  data-date-fmt="yyyy-MM"  onfocus="WdatePicker({dateFmt:'yyyy-MM',maxDate:'#F{$dp.$D(\'endMonth\')}'})"/>
                    				</td>
                    				<td>&nbsp;-&nbsp;</td>
                    				<td style="width:50%">
                    					<input id="endMonth" name="endMonth" class="textinput" type="text" readonly placeholder="结束月份"  data-date-fmt="yyyy-MM"  onfocus="WdatePicker({dateFmt:'yyyy-MM',minDate:'#F{$dp.$D(\'startMonth\')}'})"/>
                    				</td>
                    			</tr>
                    		</table>
                    </div>
                    <div class="textalign" >
                         <button id="selectSpec" type="button" onclick="search();" class="btn btn-success btn-sm"><spring:message code="message.button.seachSpacing"/></button>
                    </div>
                </div>
            </form>
            </div>
          </div>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
    </section>
      <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
        	
            $("#gridlist").jqGrid({
                url: "",
                mtype: "GET",
                datatype: "local",
                autowidth: true,
                height: 310,
                colNames: [
						'配送企业',
						'所属地区',
       					'日期',
       					'采购金额', 
                        '配送金额', 
                        '退货金额',
                        '配送率',
                        '退货率'
                ],
                colModel: [
						{ name: 'name', width: 95, align:"center", sortable: false},
						{ name: 'area', width: 60, align:"center", sortable: false},
       					{ name: 'date', width: 60, align:"center", sortable: false},
       					{ name: 'totalAmount', width: 75, align:"right", sortable: false},
                        { name: 'delAmount', width: 75, align:"right", sortable: false},
                        { name: 'retAmount', width: 75, align:"right", sortable: false},
                        { name: 'delRatio', width: 75, align:"center", sortable: false},
                        { name: 'retRatio', width: 75, align:"center", sortable: false}
                           
                ],
                rowNum: 20,
                rowList: [10, 20, 50,100],
                rownumbers: true,
                pager: "#gridpage",
                multiselect: false, 
                viewrecords: true,
                caption: "按时间统计列表",
                gridComplete:function(){
                    autoRNWidth("gridlist");

                },
                jsonReader: {
                	 repeatitems: false,
                    id: "qualitySpecId"
                },
                
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
			$("#gridlist")[0].addJSONData(
			{
			"total":1,
			"page":1,
			"records":18,
			"rows":[
			{ "number":"01","name":"宝鸡利君秦岭药业有限公司","area":"陕西宝鸡市","date":"2015-05-23", "totalAmount":"8324.32", "delAmount":"83240.32", "retAmount":"5432.90", "delRatio":"100%", "retRatio":"7%"},
			{ "number":"02","name":"陕西爱民药业股份有限公司","area":"陕西","date":"2015-06-15", "totalAmount":"21342.56", "delAmount":"21342.56", "retAmount":"8765.00", "delRatio":"100%", "retRatio":"8%"},
			{ "number":"03","name":"辰济药业有限公司","area":"陕西汉中","date":"2015-07-12", "totalAmount":"32564.50", "delAmount":"32564.50", "retAmount":"4567.10", "delRatio":"100%", "retRatio":"10%"},
			{ "number":"04","name":"礼泉县药材公司","area":"陕西西安","date":"2015-08-24", "totalAmount":"76654.40", "delAmount":"76654.40", "retAmount":"4354.80", "delRatio":"100%", "retRatio":"9%"},
			{ "number":"05","name":"陕西海普药业有限公司","area":"陕西延安","date":"2015-09-23", "totalAmount":"47437.80", "delAmount":"47437.80", "retAmount":"3212.00", "delRatio":"100%", "retRatio":"10%"},
			{ "number":"06","name":"汉王药业有限公司","area":"陕西榆林","date":"2015-10-09", "totalAmount":"56734.00", "delAmount":"56734.00", "retAmount":"6531.00", "delRatio":"100%", "retRatio":"9%"},
			{ "number":"07","name":"白水县药材公司","area":"陕西吉安市","date":"2015-07-17", "totalAmount":"35467.00", "delAmount":"35467.00", "retAmount":"5678.00", "delRatio":"100%", "retRatio":"11%"},
			{ "number":"08","name":"陕西嘉力药业有限公司","area":"陕西铜川市","date":"2015-06-12", "totalAmount":"35467.00", "delAmount":"43467.00", "retAmount":"8678.00", "delRatio":"100%", "retRatio":"12%"},
			{ "number":"09","name":"国药控股榆林有限公司","area":"陕西吉安市","date":"2015-09-24", "totalAmount":"35467.00", "delAmount":"65467.00", "retAmount":"8778.00", "delRatio":"100%", "retRatio":"9%"},
			{ "number":"10","name":"陕西美辰药业有限公司","area":"陕西安康市","date":"2015-09-21", "totalAmount":"35467.00", "delAmount":"35667.00", "retAmount":"6534.00", "delRatio":"100%", "retRatio":"12%"},
			{ "number":"11","name":"宝鸡利君秦岭药业有限公司","area":"陕西宝鸡市","date":"2015-05-14", "totalAmount":"35467.00", "delAmount":"35567.00", "retAmount":"12356.00", "delRatio":"100%", "retRatio":"10%"},
			{ "number":"12","name":"咸阳医药工业集团总公司","area":"陕西安康市","date":"2015-07-16", "totalAmount":"35467.00", "delAmount":"76467.00", "retAmount":"5344.00", "delRatio":"100%", "retRatio":"8%"},
			{ "number":"13","name":"国药集团西北医药有限公司","area":"陕西咸阳","date":"2015-11-18", "totalAmount":"35467.00", "delAmount":"89467.00", "retAmount":"7547.00", "delRatio":"100%", "retRatio":"11%"},
			{ "number":"14","name":"西安双鹤医药股份有限公司","area":"陕西铜川市","date":"2015-10-27", "totalAmount":"35467.00", "delAmount":"12467.00", "retAmount":"1253.00", "delRatio":"100%", "retRatio":"12%"},
			{ "number":"15","name":"陕西爱民药业股份有限公司","area":"陕西宝鸡","date":"2015-10-20", "totalAmount":"35467.00", "delAmount":"90467.00", "retAmount":"5623.00", "delRatio":"100%", "retRatio":"13%"},
			{ "number":"16","name":"陕西博瑞医药有限责任公司","area":"陕西吉安市","date":"2015-11-07", "totalAmount":"35467.00", "delAmount":"69467.00", "retAmount":"1253.00", "delRatio":"100%", "retRatio":"15%"},
			{ "number":"17","name":"陕西康健医药有限公司","area":"陕西铜川市","date":"2015-11-09", "totalAmount":"35467.00", "delAmount":"55467.00", "retAmount":"1235.00", "delRatio":"100%", "retRatio":"11%"},
			{ "number":"18","name":"汉中祝福医药有限公司","area":"陕西安康市","date":"2015-11-15", "totalAmount":"35467.00", "delAmount":"85467.00", "retAmount":"7326.00", "delRatio":"100%", "retRatio":"11%"}
			]
			}
			);
        });
        function search(page) {
        	var data =formatForm("form");
            $("#gridlist").jqGrid('setGridParam',{  
                datatype:'json',
                postData:data,
                page : (page || 1)
            }).trigger("reloadGrid"); //重新载入  
        }
        
        function toPsYearAnaByTime(){
        	window.location.href="${ctx}/psAnaDruginfo/toPsYearAnaByTime.html"; 
        }
        
        function toPsSeaAnaByTime(){
        	window.location.href="${ctx}/psAnaDruginfo/toPsSeaAnaByTime.html"; 
        }
        
        function toPsAnaByTime(){
        	window.location.href="${ctx}/psAnaDruginfo/toPsAnaByTime.html"; 
        }
    </script>
</body>
</html> 
                          
                  
                  